<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add Primer Sequence</title>
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/worksubmit.js"></script>
<!-- YUI Seed -->
<script src="http://yui.yahooapis.com/3.8.0/build/yui/yui-min.js"></script>
<script type="text/javascript" src="./js/yui-func.js"></script>
</head>
<body class="yui3-skin-sam">
<center><h1>Master Genome Tracking System</h1></center>
<p>
welcome, <s:property value="userName"/> ! [<a href="logout">logout</a>]
</p>
<div id="productsandservices" class="yui3-menu yui3-menu-horizontal yui3-menubuttonnav"><!-- Bounding box -->
    <div class="yui3-menu-content"><!-- Content box -->
        <ul>
            <li class="yui3-menuitem"><a class="yui3-menuitem-content" href="Notebook.action">Notebook</a></li>
            <li class="yui3-menuitem"><a class="yui3-menuitem-content" href="History.action">History</a></li>
            <li><a class="yui3-menu-label" href="Sequence.action"><em>Primer</em></a>
                <div id="submenu-1" class="yui3-menu">
                    <div class="yui3-menu-content">
                        <ul>
                        	<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="Sequence.action">Upload Primer</a></li>
                        	<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="PrimerInsert.action">Add Primer</a></li>
                        	<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="PrimerDelete">Delete Primer</a></li>
                        </ul>
                    </div>
                </div>
             </li>
            <li><a class="yui3-menu-label" href="ImageUpload"><em>Image</em></a>
                <div id="submenu-1" class="yui3-menu">
                    <div class="yui3-menu-content">
                        <ul>
                        	<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="ImageUpload">Upload Image</a></li>
                        	<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="ImageDelete">Delete Image</a></li>
                        </ul>
                    </div>
                </div>
             </li>
            <li class="yui3-menuitem"><a class="yui3-menuitem-content" href="#">Users</a></li>
        </ul>
    </div>
</div>
<p></p>
<center>
<h2>Add Primer Sequence</h2>
<s:form id="primerform">
<table>
	<tr><td><s:select label="Gene name*" name="geneName" headerKey="TK0001" headerValue="TK0001" list="geneList" /><td></td>
	<tr><td><s:textfield name = "primer" label = "Primer name"/></td></tr>
	<tr><td><s:textfield name = "plate" label = "Plate" /><td></tr>
	<tr><td><s:textfield name = "well" label = "Well" /></td></tr>
	<tr><td><s:textarea name = "sequence" label ="Sequence" cols="30" rows="3"/></td></tr>
	<tr><td><input type = "button" value="Add" onclick="addPrimer()" /></td></tr>
</table>
</s:form>
<s:if test="%{result == 'success'}">
    <div><font color="green">The primer has been added successfully!</font></div>
</s:if>
<s:elseif test="%{result == 'error'}">
    <div><font color="red">Unable to add the primer, please check all the fields.</font></div>
</s:elseif>
<div id = "insertSuccessDiv" style="display:none"><font color="green">The primer has been added successfully!</font></div>
<div id = "insertErrorDiv" style="display:none"><font color="red">Unable to add the primer, please check all the fields.</font></div>
</center>
</body>
</html>